﻿#include "evolution.h"

bool random::_initseed = false;

namespace life{

	Ofile filelog( "log.txt" );
	ostream& log = filelog;
	int Life::id_cnt = 0;

	Life* mate( Life* fa, Life* ma )
	{
		Life* pl = new Life;
		DNA::crossover( fa->dna, ma->dna, pl->dna );
		pl->generation = fa->generation + 1;
		return pl;
	}
};





//--------------------------------main func-----------------------

using namespace life;

int main()
try
{
	LifeGrp lg( 20 );
	lg.go( 1000, 0.02 );
	
	return 0;
}
catch( exception& e )
{
	cerr << e.what() << endl;
}